﻿using MediatR;
using System.Diagnostics;

namespace HelloMediatR.Handler
{
    public class PingNNotification
    {
    }
    public class Pong1 : INotificationHandler<PingN>
    {
        public async Task Handle(PingN notification, CancellationToken cancellationToken)
        {
            await Task.Delay(10000);
            Debug.WriteLine("Pong 1");
        }
    }

    public class Pong2 : INotificationHandler<PingN>
    {
        public Task Handle(PingN notification, CancellationToken cancellationToken)
        {
            Debug.WriteLine("Pong 2");
            return Task.CompletedTask;
        }
    }
}
